package com.wf.smartcomm.server.bean;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.google.gson.annotations.Expose;

@Entity
@Table(name = "t_merchant")
public class Merchant {
	@Expose
	@Id
	@Column(length = 32)
	private String objectId;
	
	@Expose
	@Column(length = 20)
	private String contacts;
	
	@Expose
	@Column
	private Integer type;
	
	@Expose
	@Column
	private Integer status;
	
	@Expose
	@Column(length = 20)
	private String tel;
	
	@Expose
	@Column(length = 50)
	private String name;
	
	@Expose
	@Column(length = 128)
	private String address;
	
	@Expose
	@Column
	private BigDecimal totalScore = BigDecimal.ZERO;
	
	@Expose
	@Column
	private BigDecimal scale = BigDecimal.ONE;
	
	@Expose
	@Column
	private BigDecimal totalAmount = BigDecimal.ZERO;
	
	@Expose
	@Column
	private Date createdAt;
	
	@Expose
	@Column
	private Date updatedAt;
	
	@ManyToOne
	@JoinColumn(name="createdBy")
	private User createdBy;
	
	@ManyToOne
	@JoinColumn(name="updatedBy")
	private User updatedBy;

	public String getObjectId() {
		return objectId;
	}

	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}

	public String getContacts() {
		return contacts;
	}

	public void setContacts(String contacts) {
		this.contacts = contacts;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	public BigDecimal getTotalScore() {
		return totalScore;
	}

	public void setTotalScore(BigDecimal totalScore) {
		this.totalScore = totalScore;
	}

	public BigDecimal getScale() {
		return scale;
	}

	public void setScale(BigDecimal scale) {
		this.scale = scale;
	}

	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	public Date getUpdatedAt() {
		return updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

	public User getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(User createdBy) {
		this.createdBy = createdBy;
	}

	public User getUpdatedBy() {
		return updatedBy;
	}

	public void setUpdatedBy(User updatedBy) {
		this.updatedBy = updatedBy;
	}

	public BigDecimal getTotalAmount() {
		return totalAmount;
	}

	public void setTotalAmount(BigDecimal totalAmount) {
		this.totalAmount = totalAmount;
	}
}
